{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>云易购登录界面</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.min.css' %}">
    <style>
        .account {
            width: 400px;
            border: 1px solid #dddddd;
            border-radius: 5px;
            box-shadow: 5px 5px 20px #aaa;

            margin-left: auto;
            margin-right: auto;
            margin-top: 100px;
            padding: 20px 40px;
        }
        .account h2 {
            margin-top: 10px;
            text-align: center;
        }

         body {
        background-image: url('/static/img/QJ9107187691.jpg'); /* 替换为你的背景图片路径 */
        background-size: cover; /* 让背景图覆盖整个页面 */
        background-repeat: no-repeat; /* 防止图片重复 */
        background-attachment: fixed; /* 固定背景图，滚动时效果更佳 */
    }
    </style>
</head>
<body>
<div class="account" style="background-color: white">
    <h3><img style="width: 210px;height: 120px" src="/static/img/logo.jpg"><span style="color: #4cae4c;font-size: 20px">用户登录</span></h3>
    <form method="post" novalidate>
        {% csrf_token %}
        <div class="form-group">
            <label>用户名</label>
            {{ form.name }}
            <span style="color: #b92c28">{{ form.name.errors.0 }}</span>
        </div>
        <div class="form-group">
            <label>密码</label>
            {{ form.password }}
            <span style="color: #b92c28">{{ form.password.errors.0 }}</span>
        </div>
        <div class="form-group">
            <label for="id_code">图片验证码</label>
            <div class="row">
                <div class="col-xs-7">
                     {{ form.code }}
                    <span style="color: #b92c28">{{ form.code.errors.0 }}</span>
                </div>
                <div class="col-xs-5">
                    <img id="image_code" src="/image/code/" style="width: 125px">
                </div>
            </div>
        </div>

        <input type="submit" value="登 录" class="btn btn-primary">
        <span style="float: right">
            <span style="color: #d58512">还没有账户？请先注册</span>
            <a class="btn btn-primary"  href="/register/">注册</a>
        </span>

    </form>

</div>
</body>
</html>